import junit.framework.Test;
import junit.framework.TestSuite;
import junit.framework.TestCase;


/**
 * Created by 18194 on 2017/5/11.
 */
public class ComplexTest extends TestCase {
    public void testAdd() throws Exception {
        Complex c1 = new Complex(4,5);
        Complex c2 = new Complex(2,9);
        String actual = String.valueOf(c1.add(c2));
        assertEquals("(6.0+14.0i)",actual);

    }

    public void testMinus() throws Exception {
        Complex c1 = new Complex(8,7);
        Complex c2 = new Complex(2,4);
        String actual = String.valueOf(c1.minus(c2));
        assertEquals("(6.0+3.0i)",actual);
    }

    public void testMultiply() throws Exception {
        Complex c1 = new Complex(4,9);
        Complex c2 = new Complex(8,5);
        String actual = String.valueOf(c1.multiply(c2));
        assertEquals("(-13.0+92.0i)",actual);
    }

    public void testDivide() throws Exception {
    }

    public void testToString() throws Exception {
    }

}
